<template>
  <div>
    <TypeNav />
    <!-- 今日推荐  -->
    <TodayRecommend />
    <!-- 分类商品一 -->
    <GoodsOFloor />
    <!-- 分类商品二 -->
    <!-- 我们需要把每个item项目传过去  -->
    <GoodsTFloor
      v-for="item in IndexGoodsT2List"
      :key="item.title"
      :goosList="item"
    />
  </div>
</template>

<script>
// import TypeNav from "../../components/TypeNav"
import TodayRecommend from "./TodayRecommend/TodayRecommend"
import GoodsOFloor from "./GoodsOFloor/GoodsOFloor.vue"
import GoodsTFloor from "./GoodsTFloor/GoodsTFloor.vue"
import TypeNav from "../../components/TypeNav"
import { reqGetIndexGoodsT2List } from "@/api/home"

export default {
  name: "Home",
  data() {
    return {
      IndexGoodsT2List: [],
    }
  },
  components: {
    // TypeNav,
    TodayRecommend,
    GoodsOFloor,
    GoodsTFloor,
    TypeNav,
  },
  async mounted() {
    const res = await reqGetIndexGoodsT2List()
    // console.log(res)
    this.IndexGoodsT2List = res
  },
}
</script>

<style></style>
